#pragma once
#include <QTableView>

class FileListView : public QTableView
{
	Q_OBJECT
public:
	FileListView(QWidget *parent = nullptr);
	virtual ~FileListView();

protected:
	void resizeEvent(QResizeEvent* event) override {
		QTableView::resizeEvent(event);
		emit columnsChanged();
		//adjustColumnsToContents();
	}

signals:
	void columnsChanged();

private:
	void adjustColumnsToContents() {
		if (model() == nullptr) {
			return;
		}

		/*for (int i = 0; i < model()->columnCount(); ++i) {
			resizeColumnToContents(i);
		}*/

		repaint();
	}
};

